import 'package:flutter_study_app/app/router/i_router.dart';
import 'package:flutter_study_app/app/router/page_builder.dart';
import 'package:flutter_study_app/app/router/routers.dart';
import 'package:flutter_study_app/module/special_region/page/storage_special_region_page.dart';
import 'package:flutter_study_app/module/special_region/page/storage_special_region_search_page.dart';

class StorageSpecialRegionRouter implements IRouter {
  @override
  List<PageBuilder> createPageBuilders() {
    return <PageBuilder>[
      PageBuilder(Routers.storageSpecialRegionPage, (param) {
        int type = param?.getInt("type") ?? 0;
        return StorageSpecialRegionPage(
          type: type,
        );
      }),
      PageBuilder(Routers.storageSpecialRegionSearchPage, (param) {
        String? name = param?.getString("name");
        return StorageSpecialRegionSearchPage(
          name: name,
        );
      }),
    ];
  }
}
